#include <sstream>
using namespace std;

#include <TH2D.h>
#include <TF2.h>

TH2D* fakeRing() {
	TH2D* histo = new TH2D("histo", "Ring", 16, -5, 5, 16, -5, 5);
	const int size = 12;
	double hits[size][2] = { { 0.0647084, -0.117299 }, { 2.3367, 3.67181 }, {
			3.81071, -2.10794 }, { -1.07999, -4.26058 }, { 3.56149, 2.3144 }, {
			4.33884, -0.153526 }, { 1.80423, 3.98306 }, { 1.20211, -4.4422 }, {
			-1.67826, 3.62634 }, { -3.09215, -2.82874 }, { -0.49232, 4.03412 },
			{ 1.78038, 3.33256 } };

	for (int i = 0; i < size; i++) {
		stringstream formss;
		formss << "exp(-((x-" << hits[i][0] << ")^2+(y-" << hits[i][1]
				<< ")^2)/2/.2^2)";
		TF2* form = new TF2("form", formss.str().c_str(), -100, 100, -100, 100);
		histo->FillRandom("form", 1000);
	}
	return histo;
}
